//
//  ViewController.swift
//  MTPopMenuDemo
//
//  Created by GT-iOS on 2018/6/6.
//  Copyright © 2018年 GT-iOS. All rights reserved.
//

import UIKit

import Alamofire

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        let rect = CGRect(x: 10, y: 100, width: 200, height: 50)
        let v = MyView(frame: rect)
        v.backgroundColor = UIColor.purple
        view.addSubview(v)
        
        Alamofire.request("eee").validate().responseJSON { (dict) in
            
        }
        
    }
    

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

}

class MyView: UIView {
    override func draw(_ rect: CGRect) {
        let bezierPath = UIBezierPath(rect: CGRect(x: 0, y: rect.size.height - 10.5, width: rect.size.width, height: 5.5))
        UIColor.red.setFill()
        bezierPath.fill(with: .normal, alpha: 1)
        bezierPath.close()
    }
}

